//
//  zhugeioFFI.m
//  zhugeDemo
//
//  Created by ffhe on 2019/6/13.
//  Copyright © 2019 threeti. All rights reserved.
//

#import "zhugeioFFI.h"

#define UPLOAD_URL @"https://u2.zhugeio.com"
#define BACKUP_URL @"https://u2.zhugeio.com"
#define ZHUGE_APPKEY @"8cde2dd8d4c34b5fbcb94ce44f6cb5a4"


@implementation zhugeioFFI

-(id)init{
    self = [super init];
    
    [[Zhuge sharedInstance] setUploadURL:UPLOAD_URL andBackupUrl:BACKUP_URL];
    
    [[Zhuge sharedInstance] startWithAppKey:ZHUGE_APPKEY launchOptions:[NSDictionary dictionary]];
    
    return self;
}


-(void)zhugeStartTrackWithPageName:(NSString *)pageName
{
    [[Zhuge sharedInstance] startTrack:pageName];
}

-(void)zhugeEndTrackWithPageName:(NSString *)pageName
{
    [[Zhuge sharedInstance] endTrack:pageName properties:[NSDictionary dictionary]];
}

-(void)zhugeTrackWithPageTypeName:(NSString *)typeName
{
    [[Zhuge sharedInstance] track:typeName properties:nil];
}



@end
